import pytest
from a3mall_yeu_lianxi.Tools.Tools import Tools
import os, time

if __name__ == '__main__':
    log = time.strftime("%Y.%m.%d.%H.%M.%S", time.localtime())
    Tools().Log(log)
    pytest.main(['-s', '../Case/Case.py', '--alluredir=../Baogao/a3mall_data', '--clean-alluredir'])
    os.system('allure generate ../Baogao/a3mall_data -o ../Baogao/a3mall_baogao --clean')
    Tools().yagmails([f'../Log/{log}.txt', "../baogao/a3mall_baogao/index.html"])
